import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import {createStyleImportPlugin} from "vite-plugin-style-import";
import path from "path";

// https://vite.dev/config/
export default defineConfig({
  plugins: [vue(),
  createStyleImportPlugin({
    libs: [
      {
        libraryName: 'vant',
        esModule: false,
        resolveStyle: (name) => `vant/es/${name}/style/index`,
      },
    ],
  })],
  resolve:{
    alias:{
      '@':path.resolve(__dirname,"src"),
      "components":path.resolve(__dirname,"src/components"),
      "store":path.resolve(__dirname,"src/store"),
      "utils":path.resolve(__dirname,"src/utils"),
      "service":path.resolve(__dirname,"src/service")
    }
  }
})
